
%option caseless


%{
#include "parser.tab.h"
%}

%%

\n					{return TOK_END;}
:					{return TOK_COLON;}
^[\t ]*module			{return TOK_MODULE;}
^[\t ]*init			{return TOK_INIT;}
^[\t ]*patch			{return TOK_PATCH;}
^[\t ]*seconds			{return TOK_SECONDS;}
^[\t ]*samples			{return TOK_SAMPLES;}
^[\t ]*sr				{return TOK_SR;}
^[\t ]*sampling[\t ]*rate	{return TOK_SR;}
[[:alpha:]_][[:alnum:]_]*			{yylval.string = (void *)strdup(yytext); return TOK_WORD;}
-?[[:digit:]]+				{yylval.string = (void *)strdup(yytext); return TOK_INTEGER;}
-?[[:digit:]]*\.[[:digit:]]+				{yylval.string = (void *)strdup(yytext); return TOK_DECIMAL;}
[\t ]+					;
.					{return TOK_ERROR;}

%%

